package com.uzai.common.enums;

/**
 * @author jianghan
 * @date 2018-02-08 15:37
 */
public enum PyqJobDetailStatusEnum {
    NOSEND(0,"未发送"),
    SENDING(1,"发送中"),
    SUSPEND(2,"暂停"),
    SENDED(3,"已发送"),
    DELPYQ(4,"已删除朋友圈"),
    SENDFAIL(5,"发送失败");
    private Integer value;
    private String desc;
    PyqJobDetailStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    public Integer getValue() {
        return value;
    }
    public String getDesc() {
        return desc;
    }
    public static PyqJobDetailStatusEnum getValue(Integer value) {
        if (value == null) {
            return null;
        }
        for (PyqJobDetailStatusEnum type: PyqJobDetailStatusEnum.values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        return null;
    }
    public static String getDesc(Integer value) {
        if(getValue(value) == null){
            return null;
        }
        return getValue(value).getDesc();
    }
}
